<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>拓扑结构</title>
<%@ include file="/WEB-INF/view/common/include.jsp"%>
<link href="${ctx}/resources/style/main.css" rel="stylesheet">
<script type="text/javascript"
	src="${ctx}/resources/pluginJs/jquery-easyui-1.4.1/easyui-patch.js"></script>
<script type="text/javascript"
	src="${ctx}/resources/pluginJs/zTree/js/jquery.ztree.core-3.5.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="${ctx}/resources/pluginJs/jquery-easyui-1.4.1/themes/icon.css">
<link rel="stylesheet" type="text/css"
	href="${ctx}/resources/pluginJs/jquery-easyui-1.4.1/themes/color.css">
<link href="${ctx}/resources/pluginJs/zTree/css/ztree.css"
	rel="stylesheet">
<style type="text/css">
.ztree LI SPAN.button {
	filter: none;
}

.tab_custom {
	bolder-right: 1px solid #95B8E7 !important;
}
</style>
<script type="text/javascript">
var downloadUrl = "${sessionScope.FILE_DOWNLOAD_URL}";
</script>
</head>
<body class="easyui-layout">
	<!-- ------------------ -->
	<div id="main_center" region="center" split="false" bolder="false">
		<div id="aa" class="easyui-layout" data-options="fit:true,bolder : true" style="margin-top:5px; margin-left:4px;padding-left: 4px;padding-right: 5px;padding-bottom: 5px;">
			<div data-options="region:'south',split:true" region="center" title="基础信息" style="padding:10px;">
				<!-- 二层  此处fit:false 面板才会出滚动条-->
				<div class="easyui-layout" data-options="fit : false,bolder : true" style="margin-top:5px; margin-left:4px;padding-left: 4px;padding-right: 5px;padding-bottom: 5px;">
					<c:forEach items="${groups}" var="groupb"  varStatus="groupstatus">
						<!-- 面板1 -->
						<div class="easyui-panel" style="width:99%; padding:2px;"
								data-options="title:'${groupb.groupName}',collapsible:true,closable:true">
								<div class="easyui-tabs" style="width:100%;">
									<c:forEach items="${groupb.storageList}" var="storage" varStatus="storagestatus">
									<div title="${storage.ipAddr }" style="width: 98%;">
										<!-- 拆分左右表格 START -->
										<table style="width: 95%;padding: 10px;">
										<tr>
											<td style="width:50%; text-align: left; vertical-align: top;">
													<!-- 基本信息 -->
													<b>基本信息:</b>
													<table class="easyui-datagrid" data-options="singleSelect:true" style="width:95%;height: 190px;">
														<thead>
															<tr>
																<th data-options="field:'f1',width:'30%'">变量</th>
																<th data-options="field:'f2',width:'70%'">值</th>
															</tr>
														</thead>
														<tbody>
															<tr>
																<td>IP</td>
																<td>${storage.ipAddr}</td>
															</tr>
															<tr>
																	<td>硬盘总容量</td>
																	<td>${storage.totalMB} MB</td>
																</tr>
																<tr>
																	<td>硬盘剩余容量</td>
																	<td>${storage.freeMB} MB</td>
																</tr>
															<tr>
																<td>状态</td>
																<td><font color="${storage.curStatus=='ACTIVE'?"green":"red"}">${storage.curStatus}</font></td>
															</tr>
															<tr>
																<td>最后更新日期</td>
																<td><fmt:formatDate value="${storage.created}"  pattern="yyyy-MM-dd HH:mm:ss"/></td>
															</tr>
														</tbody>
													</table>
											</td>
											<td style="width:50%; vertical-align: top;">
														<!-- 详细信息 -->
														<b>详细信息:</b>
														<table class="easyui-datagrid" data-options="singleSelect:true" style="width:95%;height: 190px;">
															<thead>
																<tr>
																	<th data-options="field:'f1',width:'30%'">变量</th>
																	<th data-options="field:'f2',width:'70%'">值</th>
																</tr>
															</thead>
															<tbody>
																<tr>
																	<td>IP</td>
																	<td>${storage.ipAddr}</td>
																</tr>
																<tr>
																	<td>版本</td>
																	<td>${storage.version}</td>
																</tr>
																<tr>
																	<td>文件上传优先级</td>
																	<td>${storage.uploadPriority}</td>
																</tr>
																<tr>
																	<td>加入时间</td>
																	<td><fmt:formatDate value="${storage.joinTime}"  pattern="yyyy-MM-dd HH:mm:ss"/></td>
																</tr>
																<tr>
																	<td>上传文件总数量</td>
																	<td>${storage.totalUploadCount}</td>
																</tr>
																<tr>
																	<td>up time</td>
																	<td><fmt:formatDate value="${storage.upTime}"  pattern="yyyy-MM-dd HH:mm:ss"/></td>
																</tr>
																<tr>
																	<td>store_path_count</td>
																	<td>${storage.storePathCount}</td>
																</tr>
																<tr>
																	<td>subdir_count_per_path</td>
																	<td>${storage.subDirCountPerPath}</td>
																</tr>
																<tr>
																	<td>storage_port</td>
																	<td>${storage.storagePort}</td>
																</tr>
																<tr>
																	<td>storage_http_port</td>
																	<td>${storage.storageHttpPort}</td>
																</tr>
																<tr>
																	<td>if_trunk_server</td>
																	<td>${storage.ifTrunkServer}</td>
																</tr>
																<tr>
																	<td>success_upload_count</td>
																	<td>${storage.successUploadCount}</td>
																</tr>
																<tr>
																	<td>total_set_meta_count</td>
																	<td>${storage.totalSetMetaCount}</td>
																</tr>
																<tr>
																	<td>success_set_meta_count</td>
																	<td>${storage.successSetMetaCount}</td>
																</tr>
																<tr>
																	<td>total_delete_count</td>
																	<td>${storage.totalDeleteCount}</td>
																</tr>
																<tr>
																	<td>success_delete_count</td>
																	<td>${storage.successDeleteCount}</td>
																</tr>
																<tr>
																	<td>total_download_count</td>
																	<td>${storage.totalDownloadCount}</td>
																</tr>
																<tr>
																	<td>success_download_count</td>
																	<td>${storage.successDownloadCount}</td>
																</tr>
																<tr>
																	<td>total_upload_bytes</td>
																	<td>${storage.totalUploadBytes}</td>
																</tr>
																<tr>
																	<td>success_upload_bytes</td>
																	<td>${storage.successUploadBytes}</td>
																</tr>
																<tr>
																	<td>total_download_bytes</td>
																	<td>${storage.totalDownloadloadBytes}</td>
																</tr>
																<tr>
																	<td>success_download_bytes</td>
																	<td>${storage.successDownloadloadBytes}</td>
																</tr>
																<tr>
																	<td>total_sync_in_bytes</td>
																	<td>${storage.totalSyncInBytes}</td>
																</tr>
																<tr>
																	<td>success_sync_in_bytes </td>
																	<td>${storage.successSyncInBytes}</td>
																</tr>
																<tr>
																	<td>total_file_open_count</td>
																	<td>${storage.totalFileOpenCount}</td>
																</tr>
																<tr>
																	<td>success_file_open_count</td>
																	<td>${storage.successFileOpenCount}</td>
																</tr>
																<tr>
																	<td>total_file_read_count</td>
																	<td>${storage.totalFileReadCount}</td>
																</tr>
																<tr>
																	<td>success_file_read_count</td>
																	<td>${storage.successFileReadCount}</td>
																</tr>
																<tr>
																	<td>total_file_write_count</td>
																	<td>${storage.totalFileWriteCount}</td>
																</tr>
																<tr>
																	<td>success_file_write_count</td>
																	<td>${storage.successFileWriteCount}</td>
																</tr>
																<tr>
																	<td>last_heart_beat_time</td>
																	<td><fmt:formatDate value="${storage.lastHeartBeatTime}"  pattern="yyyy-MM-dd HH:mm:ss"/></td>
																</tr>
																<tr>
																	<td>last_source_update</td>
																	<td><fmt:formatDate value="${storage.lastSourceUpdate}"  pattern="yyyy-MM-dd HH:mm:ss"/></td>
																</tr>
																<tr>
																	<td>last_sync_update</td>
																	<td><fmt:formatDate value="${storage.lastSyncUpdate}"  pattern="yyyy-MM-dd HH:mm:ss"/></td>
																</tr>
																<tr>
																	<td>last_synced_timestamp</td>
																	<td>
																	<fmt:formatDate value="${storage.lastSyncedTimestamp }"  pattern="yyyy-MM-dd HH:mm:ss"/>
																	</td>
																</tr>
															</tbody>
														</table>
											</td>
										</tr>
										</table>
										<!-- 拆分左右表格 END -->

									</div>
								</c:forEach>
								</div>
						</div>
					</c:forEach>
				</div>
			</div>
		</div>
	</div>
	<!-- ------------------ -->
</body>
</html>
